package pl.mess.core.tags.elements;

import pl.mess.core.tags.ifc.ControlAttribute;

import javax.servlet.jsp.JspException;
import java.util.List;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: gibffe
 * Date: Mar 10, 2006
 * Time: 3:28:06 PM
 * To change this template use File | Settings | File Templates.
 */
public class MESSPanelTag extends MESSBaseTag {

    private static final String TAG_NAME = "panel";

    /**
     * Parameter defining panel type.
     *      horizontal panel:  true
     *      vertical panel:    false
     */
    @ControlAttribute public Boolean horizontal = Boolean.TRUE;

    /**
     * Parameter defining panel initial width
     */
    @ControlAttribute public Integer width = null;

    /**
     * Parameter defining panel max width
     */
    @ControlAttribute public Integer maxWidth = null;

    /**
     * Parameter defining panel min width
     */
    @ControlAttribute public Integer minWidth = null;

    /**
     * Parameter defining panel initial height
     */
    @ControlAttribute public Integer height = null;

    /**
     * Parameter defining panel max height
     */
    @ControlAttribute public Integer maxHeight = null;

    /**
     * Parameter defining panel min height
     */
    @ControlAttribute public Integer minHeight = null;

    /**
     * Panel background image
     */
    @ControlAttribute public String backgroundImage = null;

    /**
     * Panel theme selector string
     */
    @ControlAttribute public String theme = null;

    /**
     * Splitter support flag
     * If set to false, panel will have no splitters on any side
     */
    @ControlAttribute public Boolean supportsSplitter = null;



    public String getTagName() {
        return TAG_NAME;
    }


    /**
     * StartTag method
     * @return
     * @throws JspException
     */
    public int doStartTag() throws JspException {

        return super.doStartTag();
    }

    /**
     * EndTag method
     * @return
     * @throws JspException
     */
    public int doEndTag() throws JspException {

        return super.doEndTag();
    }


    // property: horizontal
    public void setHorizontal(Boolean horizontal) {
        this.horizontal = horizontal;
    }

    public Boolean getHorizontal() {
        return this.horizontal;
    }

    // property: width
    public void setWidth(Integer width) {
        this.width = width;
    }

    public Integer getWidth() {
        return this.width;
    }

    // property: maxWidth
    public void setMaxWidth(Integer maxWidth) {
        this.maxWidth = maxWidth;
    }

    public Integer getMaxWidth() {
        return maxWidth;
    }

    // property: minWidth
    public void setMinWidth(Integer minWidth) {
        this.minWidth = minWidth;
    }

    public Integer getMinWidth() {
        return minWidth;
    }


    // property: height
    public void setHeight(Integer height) {
        this.height = height;
    }

    public Integer getHeight() {
        return height;
    }

    // property: max height
    public void setMaxHeight(String maxHeight) {
        this.maxHeight = new Integer(maxHeight);
    }

    public Integer getMaxHeight() {
        return maxHeight;
    }

    // property: min height
    public void setMinHeight(Integer minHeight) {
        this.minHeight = minHeight;
    }

    public Integer getMinHeight() {
        return this.minHeight;
    }

    // property: background image
    public String getBackgroundImage() {
        return backgroundImage;
    }

    public void setBackgroundImage(String backgroundImage) {
        this.backgroundImage = backgroundImage;
    }

    // property: theme
    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getTheme() {
        return this.theme;
    }


    public Boolean getSupportsSplitter() {
        return this.supportsSplitter;
    }

    public void setSupportsSplitter(Boolean supportsSplitter) {
        this.supportsSplitter = supportsSplitter;
    }
}
